package com.swt.service.impl.W_impl;

import com.swt.dao.impl.W_impl.ClubDaoImpl;
import com.swt.domain.Club;
import com.swt.service.W_service.ClubService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service(value = "clubService")
public class ClubServiceImpl implements ClubService {
    @Resource
    private ClubDaoImpl clubDao;
    @Override
    public Club checkLogin(Club club) {
        return clubDao.checkLogin(club);
    }

    @Override
    @Transactional
    public void register(Club club) {
        clubDao.register(club);
    }

    @Override
    public List<Club> listToAll(int page,Club club) {
        return clubDao.listToAll(page,club);
    }

    @Override
    @Transactional
    public void delete(Club club) {
        clubDao.delete(club);
    }

    @Override
    @Transactional
    public void stop(Club club) {
        clubDao.stop(club);
    }
}
